package activity.appother;

import org.shmsa.hst4a.R;

import system.UserInfo;
import system.Utils;
import android.os.Bundle;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;

public class AppOtherBaseWeb extends AppBase {
	public WebView webview;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.app_base_web);
		webview=(WebView)findViewById(R.id.webview);
		webview.setBackgroundColor(0);
		WebSettings webSettings = webview.getSettings();
		webSettings.setJavaScriptEnabled(true);
		webSettings.setDomStorageEnabled(true);
		String un = UserInfo.userName;
		String up = UserInfo.userPassword;
		final String loginUrl = Utils.getUrlForLogin(un, up);
		webview.setWebViewClient(new WebViewClient()
		{
			@Override
			public boolean shouldOverrideUrlLoading(WebView view, String url)
			{
			
				view.loadUrl(url);
				return true;
			}
		});

		webview.loadUrl(loginUrl);
		try
		{
			Thread.sleep(1000);
		}
		catch (InterruptedException e)
		{
			e.printStackTrace();
		}
	}
}
